package javazuoye.two;

import java.util.Arrays;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/06/27 08:47
 */
public class _5_2_1 {
    public static void main(String[] args) {
        System.out.println(Arrays.toString(bianbianbian(new int[]{5,2,1,4,3})));
    }
    public static int[] bianbianbian(int[] nums) {
        int[] res = new int[nums.length];
        for (int i = 0; i < nums.length; i++) {
            for (int j=0;j<=i-1;j++){
                if (nums[j]<nums[i]){
                    res[i]++;
                }
            }
        }
        return res;
    }
}
